exports.init = function (app) {
  // 缴费信息列表
  app.post("/net/schooladmin/school-order/get-payment-list", function (req, res) {
    // res.statusCode = 401;
    res.send({
      "errcode": "0",
      "errmsg": "ok",
      "data": [{
        "id": 574,
        "price": 6,
        "schoolPaymentSkuName": "2017验收测试项目",
        "name": "李雷",
        "sex": 1,
        "idType": 1,
        "cardNo": "423112201009091113",
        "mobile": "13234568536",
        "className": "2018级阳光2班",
        "shouldPay": 5
      },
      {
        "id": 575,
        "price": 5,
        "schoolPaymentSkuName": "2017验收测试项目",
        "name": "鹏哥",
        "sex": 1,   
        "idType": 1,   
        "cardNo": "423112201009091114",
        "mobile": "13234568538",
        "className": "2018级阳光2班",
        "shouldPay": 5
      },
      {
        "id": 579,
        "price": 2,
        "schoolPaymentSkuName": "2017验收测试项目",
        "name": "平信",
        "sex": 2,
        "idType": 1,
        "cardNo": "423112201009091118",
        "mobile": "13234568542",
        "className": "2018级阳光2班",
        "shouldPay": 5
      }],
      "page": {
        "currentPage": 1,
        "currentCount": 15,
        "totalCount": 3,
        "totalPage": 1
      }
    });
  });

  // 缴费联动条件查询
  app.post("/net/schooladmin/school-order/get-payment-condition", function (req, res) {
    res.send({
      "errcode": "0",
      "errmsg": "ok",
      "data": {
        "year": ["2016-2017", "2017-2018"],
        "grade": [2016, 2017, 2018],
        "class": [{
          "classId": 28,
          "className": "阳光小（1）班"
        }],
        "payment": [{
          "id": 6,
          "name": "测试项目dly"
        }, {
          "id": 8,
          "name": "2018春季学费"
        }, {
          "id": 9,
          "name": "王先杰缴费"
        }, {
          "id": 10,
          "name": "王先杰缴费2"
        }, {
          "id": 11,
          "name": "王先杰0.05元收费"
        }],
        "default": {
          "year": "2017-2018",
          "grade": 2016,
          "class": {
            "classId": 28,
            "className": "阳光小（1）班"
          },
          "payment": {
            "id": 11,
            "name": "王先杰0.05元收费"
          }
        }
      }
    });
  });

  // 已缴费详情
  app.post("/net/schooladmin/school-order/get-payment-info", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        id: 112,
        orderNo: "11100002017102716411408572",
        schoolPaymentSkuName: "缴费缴费哦",
        schoolPaymentSkuAmount: 1,
        payAmount: 1,
        noPayAmount: 0,
        price: 1,
        payTime: 1509541135,
        tradeNo: "11111",
        className: "class 3",
        name: "王先杰",
        cardNo: "513001199308157490",
        mobile: "13333333333",
        sex: 1,
        payMethods: 2,
        idType: 1,
        gradeYear: 2017,
        "orderDetail": [{
          "id": 72,
          "orderNo": "011200002017112014262631674",
          "price": 2,
          "payTime": 1511159196
        },
        {
          "id": 75,
          "orderNo": "011200002017112014262611111",
          "price": 3,
          "payTime": 1511159196
        }],
        "discountInfo": [
          {
            "discountId": 43,
            "num": 1,
            "reason": "测试优12322221惠"
          },
          {
            "discountId": 43,
            "num": 2,
            "reason": "测试优"
          }]
      }
    });
  });

  // 数据统计
  app.post("/net/schooladmin/school-order/count-payment-info", function (req, res) {
    res.send({
      "errcode": "0",
      "errmsg": "ok",
      "data": {
        "studentNum": 1,
        "shouldPaystudentNum": 7,
        "noPaystudentNum": 6
      }
    });
  });

  // 未缴费数据列表
  app.post("/net/schooladmin/school-order/get-un-payment-list", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [{
        id: 145,
        uid: 0,
        merchantId: 1,
        schoolId: 1,
        classId: 1,
        className: "class1",
        classGradeYear: 2016,
        name: "张三三x",
        sex: 1,
        birth: 915148800,
        idType: 1,
        cardNo: "ZJH001x",
        infoNo: "XH001x",
        guardian: "张三",
        mobile: "18938888062",
        gradeYear: 2016,
        graduateYear: 2018,
        province: 0,
        city: 0,
        county: 0,
        address: "比克大厦101",
        isEnroll: 1,
        enrollTime: 1508912335,
        created: 0,
        modified: 1508461028,
        deleted: 0
      },
      {
        id: 146,
        uid: 0,
        merchantId: 1,
        schoolId: 1,
        classId: 1,
        className: "class1",
        classGradeYear: 2016,
        name: "李四四x",
        sex: 1,
        birth: 894412800,
        idType: 1,
        cardNo: "ZJH002x",
        infoNo: "XH002x",
        guardian: "李四",
        mobile: "18938888063",
        gradeYear: 2016,
        graduateYear: 2018,
        province: 0,
        city: 0,
        county: 0,
        address: "比克大厦102",
        isEnroll: 1,
        enrollTime: 1508912335,
        created: 0,
        modified: 1508461028,
        deleted: 0
      },
      {
        id: 147,
        uid: 0,
        merchantId: 1,
        schoolId: 1,
        classId: 1,
        className: "class1",
        classGradeYear: 2016,
        name: "王五五x",
        sex: 2,
        birth: 839548800,
        idType: 2,
        cardNo: "ZJH003x",
        infoNo: "XH003x",
        guardian: "王五",
        mobile: "18938888064",
        gradeYear: 2016,
        graduateYear: 2018,
        province: 0,
        city: 0,
        county: 0,
        address: "比克大厦103",
        isEnroll: 1,
        enrollTime: 1508912335,
        created: 0,
        modified: 1508461028,
        deleted: 0
      }
      ],
      page: {
        currentPage: 1,
        currentCount: 3,
        totalCount: 3,
        totalPage: 1
      }
    });
  });

  // 未缴费数据统计
  app.post("/net/schooladmin/school-order/count-un-payment-info", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        studentNum: 3,
        amount: 33600
      }
    });
  });

  // 缴费渠道
  app.get("/net/schooladmin/school-payment-sku/find-payment-account", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        schoolPaymentList: [{
          id: 1,
          type: 2,
          name: "阳光幼儿园"
        }],
        merchantPaymentList: [{
          id: 1,
          name: "集团账户",
          type: 1
        }]
      }
    });
  });

  // 缴费类型
  app.get("/net/schooladmin/school-payment-sku-type/find-all", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [{
        id: 1,
        name: '学费'
      },
      {
        id: 2,
        name: '校服费用'
      },
      {
        id: 3,
        name: '伙食费'
      }
      ]
    });
  });

  // 获取缴费项目列表
  app.get("/net/schooladmin/school-payment-sku/find-all-by-class", function (req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [{
        id: 204,
        name: "timer2"
      },
      {
        id: 139,
        name: "timer"
      },
      {
        id: 135,
        name: "哈哈哈"
      }
      ]
    });
  });

  // 社保
  // 获取缴费记录列表
  app.post("/net/socialadmin/social_order/get-list", function (req, res) {
    res.send({
      "errcode": "0",
      "errmsg": "ok",
      "data": [
        {
          "id": 13,
          "orderNo": "021200002017121911202170701",
          "totalPrice": 1,
          "shouldPay": 1,
          "orderStatus": 3,
          "payTime": 1513653621,
          "socialCompanyId": 1,
          "socialCompanyName": "常德市鼎城区华音电子厂",
          "socialCompanyCode": "400310000069",
          "socialPaymentSkuName": "2017年1月社保费"
        },
        {
          "id": 13,
          "orderNo": "021200002017121911202170701",
          "totalPrice": 1,
          "shouldPay": 1,
          "orderStatus": 3,
          "payTime": 1513653621,
          "socialCompanyId": 1,
          "socialCompanyName": "常德市鼎城区华音电子厂",
          "socialCompanyCode": "400310000069",
          "socialPaymentSkuName": "2017年1月社保费"
        },
        {
          "id": 13,
          "orderNo": "021200002017121911202170701",
          "totalPrice": 1,
          "shouldPay": 1,
          "orderStatus": 3,
          "payTime": 1513653621,
          "socialCompanyId": 1,
          "socialCompanyName": "常德市鼎城区华音电子厂",
          "socialCompanyCode": "400310000069",
          "socialPaymentSkuName": "2017年1月社保费"
        }
      ],
      "page": {
        "currentPage": 1,
        "currentCount": 10,
        "totalCount": 100,
        "totalPage": 10
      }
    });
  });

  // 缴费记录详情
  app.post("/net/socialadmin/social_order/get-detail", function (req, res) {
    res.send({
      "errcode": "0",
      "errmsg": "ok",
      "data": {
        "id": 13,
        "socialCompanyId": 1,
        "socialCompanyName": "常德市鼎城区华音电子厂",
        "socialCompanyCode": "400310000069",
        "socialPaymentSkuName": "2017年1月社保费",
        "price": 1,
        "factorage": "0.00000000",
        "payTime": 1513653621,
        "orderNo": "021200002017121911202170701",
        "payStatus": 2,
        "tradeNo": ""
      }
    });
  });
};
